package com.quan.commons.annotation;

import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.lang.annotation.*;

/**
 * PUT方式请求http的资源标识
 *
 * @author hp
 * @since 2020-12-08
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping(method = RequestMethod.PUT)
public @interface PutResource {

    /**
     * 资源名称(必填项)
     *
     * @return java.lang.String
     */
    @AliasFor(annotation = RequestMapping.class)
    String name() default "";

    /**
     * 需要的权限code
     *
     * @return java.lang.String
     */
    String hasAuthority() default "";

    /**
     * 请求路径(同RequestMapping)
     *
     * @return java.lang.String[]
     */
    @AliasFor(annotation = RequestMapping.class)
    String[] path() default {};

    /**
     * 请求路径(同RequestMapping)
     *
     * @return java.lang.String[]
     */
    @AliasFor(annotation = RequestMapping.class)
    String[] value() default {};

}
